#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans=0;
void solve()
{
    int a,b;
    char c;
    cin>>a>>c>>b;
    if(c=='>')if(a>b)ans++;
    if(c=='=')if(a==b)ans++;
    if(c=='<')if(a<b)ans++;
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    cin>>T;
    while(T--)
    {
       solve();
    }
    cout<<ans;
    return 0;
}